package com.bawei.module_play.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.Lifecycle
import androidx.viewpager2.adapter.FragmentStateAdapter

class PlayPageAdapter  constructor(private val fragment:MutableList<Fragment>,fm:FragmentManager,lifcycle:Lifecycle):FragmentStateAdapter(fm,lifcycle){
    override fun getItemCount(): Int {
        return fragment.size
    }

    override fun createFragment(position: Int): Fragment {
        return fragment[position]
    }

    override fun getItemId(position: Int): Long {
        return position.toLong()
    }


}